package ru.onlinestore.mobile.ui.theme

import android.app.Activity
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.material3.*
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalView

private val darkTheme = darkColorScheme(

)

private val lightTheme = lightColorScheme(

)

private val view @Composable get() = LocalView.current

private val window @Composable get() = (view.context as Activity).window

@Composable
fun OnlineStoreTheme(
    useDarkTheme: Boolean = isSystemInDarkTheme(),
    content: @Composable () -> Unit
) {
    window.statusBarColor = black.toArgb()
    MaterialTheme(
        colorScheme = if (useDarkTheme) darkTheme else lightTheme,
        content = content
    )
}
